home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / gfx / nsIPrintSettingsService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  10KB  |  223 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPrintSettingsService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPrintSettingsService_h__
  6. #define __gen_nsIPrintSettingsService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIPrintSettings; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIPrintSettingsService */
  21. #define NS_IPRINTSETTINGSSERVICE_IID_STR "841387c8-72e6-484b-9296-bf6eea80d58a"
  22.  
  23. #define NS_IPRINTSETTINGSSERVICE_IID \
  24.   {0x841387c8, 0x72e6, 0x484b, \
  25.     { 0x92, 0x96, 0xbf, 0x6e, 0xea, 0x80, 0xd5, 0x8a }}
  26.  
  27. class NS_NO_VTABLE nsIPrintSettingsService : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPRINTSETTINGSSERVICE_IID)
  31.  
  32.   /**
  33.    * Returns a "global" PrintSettings object 
  34.    * Creates a new the first time, if one doesn't exist.
  35.    *
  36.    * Then returns the same object each time after that.
  37.    *
  38.    * Initializes the globalPrintSettings from the default printer
  39.    */
  40.   /* readonly attribute nsIPrintSettings globalPrintSettings; */
  41.   NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) = 0;
  42.  
  43.   /**
  44.    * Returns a new, unique PrintSettings object each time.
  45.    *
  46.    * For example, if each browser was to have its own unique
  47.    * PrintSettings, then each browser window would call this to
  48.    * create its own unique PrintSettings object.
  49.    *
  50.    * If each browse window was to use the same PrintSettings object
  51.    * then it should use "globalPrintSettings"
  52.    *
  53.    * Initializes the newPrintSettings from the default printer
  54.    *
  55.    */
  56.   /* readonly attribute nsIPrintSettings newPrintSettings; */
  57.   NS_IMETHOD GetNewPrintSettings(nsIPrintSettings * *aNewPrintSettings) = 0;
  58.  
  59.   /**
  60.    * The name of the default printer 
  61.    */
  62.   /* readonly attribute wstring defaultPrinterName; */
  63.   NS_IMETHOD GetDefaultPrinterName(PRUnichar * *aDefaultPrinterName) = 0;
  64.  
  65.   /**
  66.    * Initializes certain settings from the native printer into the PrintSettings
  67.    * if aPrinterName is null then it uses the default printer name if it can
  68.    * These settings include, but are not limited to:
  69.    *   Page Orientation
  70.    *   Page Size
  71.    *   Number of Copies
  72.    */
  73.   /* void initPrintSettingsFromPrinter (in wstring aPrinterName, in nsIPrintSettings aPrintSettings); */
  74.   NS_IMETHOD InitPrintSettingsFromPrinter(const PRUnichar *aPrinterName, nsIPrintSettings *aPrintSettings) = 0;
  75.  
  76.   /**
  77.    * Reads PrintSettings values from Prefs,
  78.    * the values to be read are indicated by the "flags" arg.
  79.    *
  80.    * First it reads in the "generic" set of PrintSetings not associated with any printer
  81.    * then it uses the PrinterName in the PrinterSettings to read any settings that were saved
  82.    * just for that printer.
  83.    *
  84.    * aPS - PrintSettings to have its settings read
  85.    * aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix
  86.    * aFlags - indicates which prefs to read, see nsIPrintSettings.idl for the const values.
  87.    *
  88.    * Items not read:
  89.    *   startPageRange, endPageRange, scaling, printRange, title
  90.    *   docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage
  91.    *   printFrameType, printSilent, shrinkToFit, numCopies
  92.    *
  93.    */
  94.   /* void initPrintSettingsFromPrefs (in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags); */
  95.   NS_IMETHOD InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags) = 0;
  96.  
  97.   /**
  98.    * Writes PrintSettings values to Prefs, 
  99.    * the values to be written are indicated by the "flags" arg.
  100.    *
  101.    * If there is no PrinterName in the PrinterSettings 
  102.    * the values are saved as the "generic" values not associated with any printer.
  103.    * If a PrinterName is there, then it saves the items qualified for that Printer
  104.    *
  105.    * aPS - PrintSettings to have its settings saved
  106.    * aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix
  107.    * aFlags - indicates which prefs to save, see nsIPrintSettings.idl for the const values.
  108.    *
  109.    * Items not written:
  110.    *   startPageRange, endPageRange, scaling, printRange, title
  111.    *   docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage
  112.    *   printFrameType, printSilent, shrinkToFit, numCopies
  113.    *
  114.    */
  115.   /* void savePrintSettingsToPrefs (in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags); */
  116.   NS_IMETHOD SavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags) = 0;
  117.  
  118. };
  119.  
  120. /* Use this macro when declaring classes that implement this interface. */
  121. #define NS_DECL_NSIPRINTSETTINGSSERVICE \
  122.   NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings); \
  123.   NS_IMETHOD GetNewPrintSettings(nsIPrintSettings * *aNewPrintSettings); \
  124.   NS_IMETHOD GetDefaultPrinterName(PRUnichar * *aDefaultPrinterName); \
  125.   NS_IMETHOD InitPrintSettingsFromPrinter(const PRUnichar *aPrinterName, nsIPrintSettings *aPrintSettings); \
  126.   NS_IMETHOD InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags); \
  127.   NS_IMETHOD SavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags); 
  128.  
  129. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  130. #define NS_FORWARD_NSIPRINTSETTINGSSERVICE(_to) \
  131.   NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) { return _to GetGlobalPrintSettings(aGlobalPrintSettings); } \
  132.   NS_IMETHOD GetNewPrintSettings(nsIPrintSettings * *aNewPrintSettings) { return _to GetNewPrintSettings(aNewPrintSettings); } \
  133.   NS_IMETHOD GetDefaultPrinterName(PRUnichar * *aDefaultPrinterName) { return _to GetDefaultPrinterName(aDefaultPrinterName); } \
  134.   NS_IMETHOD InitPrintSettingsFromPrinter(const PRUnichar *aPrinterName, nsIPrintSettings *aPrintSettings) { return _to InitPrintSettingsFromPrinter(aPrinterName, aPrintSettings); } \
  135.   NS_IMETHOD InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags) { return _to InitPrintSettingsFromPrefs(aPrintSettings, aUsePrinterNamePrefix, aFlags); } \
  136.   NS_IMETHOD SavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags) { return _to SavePrintSettingsToPrefs(aPrintSettings, aUsePrinterNamePrefix, aFlags); } 
  137.  
  138. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  139. #define NS_FORWARD_SAFE_NSIPRINTSETTINGSSERVICE(_to) \
  140.   NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGlobalPrintSettings(aGlobalPrintSettings); } \
  141.   NS_IMETHOD GetNewPrintSettings(nsIPrintSettings * *aNewPrintSettings) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNewPrintSettings(aNewPrintSettings); } \
  142.   NS_IMETHOD GetDefaultPrinterName(PRUnichar * *aDefaultPrinterName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultPrinterName(aDefaultPrinterName); } \
  143.   NS_IMETHOD InitPrintSettingsFromPrinter(const PRUnichar *aPrinterName, nsIPrintSettings *aPrintSettings) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitPrintSettingsFromPrinter(aPrinterName, aPrintSettings); } \
  144.   NS_IMETHOD InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitPrintSettingsFromPrefs(aPrintSettings, aUsePrinterNamePrefix, aFlags); } \
  145.   NS_IMETHOD SavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->SavePrintSettingsToPrefs(aPrintSettings, aUsePrinterNamePrefix, aFlags); } 
  146.  
  147. #if 0
  148. /* Use the code below as a template for the implementation class for this interface. */
  149.  
  150. /* Header file */
  151. class nsPrintSettingsService : public nsIPrintSettingsService
  152. {
  153. public:
  154.   NS_DECL_ISUPPORTS
  155.   NS_DECL_NSIPRINTSETTINGSSERVICE
  156.  
  157.   nsPrintSettingsService();
  158.  
  159. private:
  160.   ~nsPrintSettingsService();
  161.  
  162. protected:
  163.   /* additional members */
  164. };
  165.  
  166. /* Implementation file */
  167. NS_IMPL_ISUPPORTS1(nsPrintSettingsService, nsIPrintSettingsService)
  168.  
  169. nsPrintSettingsService::nsPrintSettingsService()
  170. {
  171.   /* member initializers and constructor code */
  172. }
  173.  
  174. nsPrintSettingsService::~nsPrintSettingsService()
  175. {
  176.   /* destructor code */
  177. }
  178.  
  179. /* readonly attribute nsIPrintSettings globalPrintSettings; */
  180. NS_IMETHODIMP nsPrintSettingsService::GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings)
  181. {
  182.     return NS_ERROR_NOT_IMPLEMENTED;
  183. }
  184.  
  185. /* readonly attribute nsIPrintSettings newPrintSettings; */
  186. NS_IMETHODIMP nsPrintSettingsService::GetNewPrintSettings(nsIPrintSettings * *aNewPrintSettings)
  187. {
  188.     return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190.  
  191. /* readonly attribute wstring defaultPrinterName; */
  192. NS_IMETHODIMP nsPrintSettingsService::GetDefaultPrinterName(PRUnichar * *aDefaultPrinterName)
  193. {
  194.     return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196.  
  197. /* void initPrintSettingsFromPrinter (in wstring aPrinterName, in nsIPrintSettings aPrintSettings); */
  198. NS_IMETHODIMP nsPrintSettingsService::InitPrintSettingsFromPrinter(const PRUnichar *aPrinterName, nsIPrintSettings *aPrintSettings)
  199. {
  200.     return NS_ERROR_NOT_IMPLEMENTED;
  201. }
  202.  
  203. /* void initPrintSettingsFromPrefs (in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags); */
  204. NS_IMETHODIMP nsPrintSettingsService::InitPrintSettingsFromPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags)
  205. {
  206.     return NS_ERROR_NOT_IMPLEMENTED;
  207. }
  208.  
  209. /* void savePrintSettingsToPrefs (in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags); */
  210. NS_IMETHODIMP nsPrintSettingsService::SavePrintSettingsToPrefs(nsIPrintSettings *aPrintSettings, PRBool aUsePrinterNamePrefix, PRUint32 aFlags)
  211. {
  212.     return NS_ERROR_NOT_IMPLEMENTED;
  213. }
  214.  
  215. /* End of implementation class template. */
  216. #endif
  217.  
  218. // {841387C8-72E6-484b-9296-BF6EEA80D58A}
  219. #define NS_PRINTSETTINGSSERVICE_IID \
  220.  {0x841387c8, 0x72e6, 0x484b, { 0x92, 0x96, 0xbf, 0x6e, 0xea, 0x80, 0xd5, 0x8a}}
  221.  
  222. #endif /* __gen_nsIPrintSettingsService_h__ */
  223.